package com.qt.socket.tcpwork;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

/**
 * @Author zsf
 * @Date 2023/10/5 2:45
 * @Version 1.0
 */
public class TcpSend {

    public static void main(String[] args) throws IOException {

        Socket socket = new Socket("127.0.0.1", 8888);
        OutputStream os = socket.getOutputStream();
        String str = "你好";
        os.write(str.getBytes());
        os.close();
        socket.close();

    }

}
